'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
    async up(queryInterface, Sequelize) {
        const chapterArr =[
            {
                courseId: 1,
                title: 'CSS 介绍',
                content: 'CSS 全名叠加样式表',
                video: '',
                rank: 1,
                createdAt: new Date(), updatedAt: new Date()
            },
            {
                courseId: 2,
                title: 'Node 介绍',
                content: 'Node 来源于，是 某某某 开发的一款后端应用',
                video: '',
                rank: 1,
                createdAt: new Date(), updatedAt: new Date()
            },
            {
                courseId: 2,
                title: 'Node 安装',
                content: 'Node 官网去下载，官网地址为 https:node.com',
                video: '',
                rank: 2,
                createdAt: new Date(), updatedAt: new Date()
            },
        ]
        await queryInterface.bulkInsert('Chapters', chapterArr, {});
    },

  async down(queryInterface, Sequelize) {
    await queryInterface.dropTable('Chapters');
}
};
